/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudm_UECM
 * Nudm Context Management Service. � 2020, 3GPP Organizational Partners (ARIB,
 * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 1.1.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "Amf3GppAccessRegistrationModification.h"

namespace oai::udm::model {

Amf3GppAccessRegistrationModification::Amf3GppAccessRegistrationModification() {
  m_PurgeFlag                = false;
  m_PurgeFlagIsSet           = false;
  m_Pei                      = "";
  m_PeiIsSet                 = false;
  m_ImsVoPsIsSet             = false;
  m_BackupAmfInfoIsSet       = false;
  m_EpsInterworkingInfoIsSet = false;
  m_UeSrvccCapability        = false;
  m_UeSrvccCapabilityIsSet   = false;
  m_NoEeSubscriptionInd      = false;
  m_NoEeSubscriptionIndIsSet = false;
}

Amf3GppAccessRegistrationModification::
    ~Amf3GppAccessRegistrationModification() {}

void Amf3GppAccessRegistrationModification::validate() {
  // TODO: implement validation
}

void to_json(
    nlohmann::json& j, const Amf3GppAccessRegistrationModification& o) {
  j          = nlohmann::json();
  j["guami"] = o.m_Guami;
  if (o.purgeFlagIsSet()) j["purgeFlag"] = o.m_PurgeFlag;
  if (o.peiIsSet()) j["pei"] = o.m_Pei;
  if (o.imsVoPsIsSet()) j["imsVoPs"] = o.m_ImsVoPs;
  if (o.backupAmfInfoIsSet() || !o.m_BackupAmfInfo.empty())
    j["backupAmfInfo"] = o.m_BackupAmfInfo;
  if (o.epsInterworkingInfoIsSet())
    j["epsInterworkingInfo"] = o.m_EpsInterworkingInfo;
  if (o.ueSrvccCapabilityIsSet())
    j["ueSrvccCapability"] = o.m_UeSrvccCapability;
  if (o.noEeSubscriptionIndIsSet())
    j["noEeSubscriptionInd"] = o.m_NoEeSubscriptionInd;
}

void from_json(
    const nlohmann::json& j, Amf3GppAccessRegistrationModification& o) {
  j.at("guami").get_to(o.m_Guami);
  if (j.find("purgeFlag") != j.end()) {
    j.at("purgeFlag").get_to(o.m_PurgeFlag);
    o.m_PurgeFlagIsSet = true;
  }
  if (j.find("pei") != j.end()) {
    j.at("pei").get_to(o.m_Pei);
    o.m_PeiIsSet = true;
  }
  if (j.find("imsVoPs") != j.end()) {
    j.at("imsVoPs").get_to(o.m_ImsVoPs);
    o.m_ImsVoPsIsSet = true;
  }
  if (j.find("backupAmfInfo") != j.end()) {
    j.at("backupAmfInfo").get_to(o.m_BackupAmfInfo);
    o.m_BackupAmfInfoIsSet = true;
  }
  if (j.find("epsInterworkingInfo") != j.end()) {
    j.at("epsInterworkingInfo").get_to(o.m_EpsInterworkingInfo);
    o.m_EpsInterworkingInfoIsSet = true;
  }
  if (j.find("ueSrvccCapability") != j.end()) {
    j.at("ueSrvccCapability").get_to(o.m_UeSrvccCapability);
    o.m_UeSrvccCapabilityIsSet = true;
  }
  if (j.find("noEeSubscriptionInd") != j.end()) {
    j.at("noEeSubscriptionInd").get_to(o.m_NoEeSubscriptionInd);
    o.m_NoEeSubscriptionIndIsSet = true;
  }
}

Guami Amf3GppAccessRegistrationModification::getGuami() const {
  return m_Guami;
}
void Amf3GppAccessRegistrationModification::setGuami(Guami const& value) {
  m_Guami = value;
}
bool Amf3GppAccessRegistrationModification::isPurgeFlag() const {
  return m_PurgeFlag;
}
void Amf3GppAccessRegistrationModification::setPurgeFlag(bool const value) {
  m_PurgeFlag      = value;
  m_PurgeFlagIsSet = true;
}
bool Amf3GppAccessRegistrationModification::purgeFlagIsSet() const {
  return m_PurgeFlagIsSet;
}
void Amf3GppAccessRegistrationModification::unsetPurgeFlag() {
  m_PurgeFlagIsSet = false;
}
std::string Amf3GppAccessRegistrationModification::getPei() const {
  return m_Pei;
}
void Amf3GppAccessRegistrationModification::setPei(std::string const& value) {
  m_Pei      = value;
  m_PeiIsSet = true;
}
bool Amf3GppAccessRegistrationModification::peiIsSet() const {
  return m_PeiIsSet;
}
void Amf3GppAccessRegistrationModification::unsetPei() {
  m_PeiIsSet = false;
}
ImsVoPs Amf3GppAccessRegistrationModification::getImsVoPs() const {
  return m_ImsVoPs;
}
void Amf3GppAccessRegistrationModification::setImsVoPs(ImsVoPs const& value) {
  m_ImsVoPs      = value;
  m_ImsVoPsIsSet = true;
}
bool Amf3GppAccessRegistrationModification::imsVoPsIsSet() const {
  return m_ImsVoPsIsSet;
}
void Amf3GppAccessRegistrationModification::unsetImsVoPs() {
  m_ImsVoPsIsSet = false;
}
std::vector<BackupAmfInfo>&
Amf3GppAccessRegistrationModification::getBackupAmfInfo() {
  return m_BackupAmfInfo;
}
void Amf3GppAccessRegistrationModification::setBackupAmfInfo(
    std::vector<BackupAmfInfo> const& value) {
  m_BackupAmfInfo      = value;
  m_BackupAmfInfoIsSet = true;
}
bool Amf3GppAccessRegistrationModification::backupAmfInfoIsSet() const {
  return m_BackupAmfInfoIsSet;
}
void Amf3GppAccessRegistrationModification::unsetBackupAmfInfo() {
  m_BackupAmfInfoIsSet = false;
}
EpsInterworkingInfo
Amf3GppAccessRegistrationModification::getEpsInterworkingInfo() const {
  return m_EpsInterworkingInfo;
}
void Amf3GppAccessRegistrationModification::setEpsInterworkingInfo(
    EpsInterworkingInfo const& value) {
  m_EpsInterworkingInfo      = value;
  m_EpsInterworkingInfoIsSet = true;
}
bool Amf3GppAccessRegistrationModification::epsInterworkingInfoIsSet() const {
  return m_EpsInterworkingInfoIsSet;
}
void Amf3GppAccessRegistrationModification::unsetEpsInterworkingInfo() {
  m_EpsInterworkingInfoIsSet = false;
}
bool Amf3GppAccessRegistrationModification::isUeSrvccCapability() const {
  return m_UeSrvccCapability;
}
void Amf3GppAccessRegistrationModification::setUeSrvccCapability(
    bool const value) {
  m_UeSrvccCapability      = value;
  m_UeSrvccCapabilityIsSet = true;
}
bool Amf3GppAccessRegistrationModification::ueSrvccCapabilityIsSet() const {
  return m_UeSrvccCapabilityIsSet;
}
void Amf3GppAccessRegistrationModification::unsetUeSrvccCapability() {
  m_UeSrvccCapabilityIsSet = false;
}
bool Amf3GppAccessRegistrationModification::isNoEeSubscriptionInd() const {
  return m_NoEeSubscriptionInd;
}
void Amf3GppAccessRegistrationModification::setNoEeSubscriptionInd(
    bool const value) {
  m_NoEeSubscriptionInd      = value;
  m_NoEeSubscriptionIndIsSet = true;
}
bool Amf3GppAccessRegistrationModification::noEeSubscriptionIndIsSet() const {
  return m_NoEeSubscriptionIndIsSet;
}
void Amf3GppAccessRegistrationModification::unsetNoEeSubscriptionInd() {
  m_NoEeSubscriptionIndIsSet = false;
}

}  // namespace oai::udm::model
